package util;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class CriarBanco {

	public static void main(String[] args) {
		try {
			EntityManagerFactory factory = Persistence.createEntityManagerFactory("AutoMecPU");
			EntityManager em = factory.createEntityManager();
			em.close();
			factory.close();
			System.out.println("BANCO GERADO COM SUCESSO!");
		}catch (Exception e) {
			System.out.println("ERRO AO GERAR O BANCO: " + e.getMessage());
		}
	}	
}